const network = require('./network.js');

module.exports = {

  // 小程序 第三方微信支付配置 （一键加油）
  refueling: {
    access_token: "d583b3c2b6d149e9b91eca3b851b839c",
    merchant_no: '822100208000267',
    terminal_id: '10887376',
  },
  // 小程序 第三方微信支付配置 （充值）
  recharge: {
    access_token: "25146f3467e24603ba4c30c12667ecb4",
    merchant_no: '822100111000056',
    terminal_id: '10656994',
  },
  scretKey: "915dd4d45df6f4h351df62d2",
  appkey: "725ad4844ef2f4a351dd43f2",
  baseUrl: network.baseUrl,
  uploadFile: network.baseUrl + "/util/uploadFile",
  //  
  getUserPhone: (data) => {
    let url = '/auth/getPublicUserInfo';
    return network.POST(url, data);
  },
  // 绑定手机号
  openid_phone: (data) => {
    let url = '/auth/bindPhone';
    return network.POST(url, data);
  },
  // 小程序根据code获取openId
  wxOpenid: (data) => {
    let url = '/auth/getXcxOpenid';
    return network.POST(url, data);
  },
  // 小程序授权登陆
  authorizedLogin: (data) => {
    let url = '/auth/authorizedLogin';
    return network.POST(url, data);
  },
  // 距离测算 腾旭地图
  getDistance: (data) => {
    let url = 'https://apis.map.qq.com/ws/distance/v1/';
    return network.POST(data);
  },
  // 获取最近油站
  drivingDistance: (data) => {
    let url = '/api/memberInfo/drivingDistance';
    return network.POST(url, data);
  },
  // 预支付接口
  payInfo: (data) => {
    let url = '/api/pay/getSignupWeixin'
    return network.POST(url, data);
  },
  // 创建充值订单接口
  createRechargeOrder: (data, head) => {
    let url = '/api/order/createRechargeOrder';
    return network.POST(url, data, head)
  },
  // 获取幂等性token
  getIdempotentToken: (data) => {
    let url = '/util/getIdempotentToken'
    return network.POST(url, data);
  },
  // 获取充值消费的活动
  getActivityDetails: (data) => {
    let url = '/api/activity/getActivityDetails'
    return network.POST(url, data);
  },
  // 充值微信签名
  getSignupRechargeWeixin: (data) => {
    let url = '/api/order/getSignupRechargeWeixin'
    return network.POST(url, data);
  },
  // 微信预支付
  pay: (data) => {
    let url = '/api/pay/getSignupWeixin'
    return network.POST(url, data);
  },
  // 查询会员信息
  getMemberInfo(data) {
    let url = '/api/memberInfo/getMemberInfo'
    return network.POST(url, data);
  },
  //通过城市id获取油站列表
  getstoreList(data) {
    let url = '/api/store/getStoreListByCityId'
    return network.POST(url, data);
  },
  //通过门店id获取油站信息
  oilstation(data) {
    let url = '/api/store/getStore'
    return network.POST(url, data);
  },
  //创建消费订单
  createOrder: (data, head) => {
    let url = '/api/order/createOrder';
    return network.POST(url, data, head)
  },
  //获取会员可用优惠券
  getCoupon: (data) => {
    let url = '/api/memberInfo/getMemberCouponForOrder';
    return network.POST(url, data)
  },
  // 获取会员卡列表
  getMemberInfoCard(data) {
    let url = '/api/memberInfoCard/getMemberInfoCard'
    return network.POST(url, data);
  },
  // 获取会员卡推荐站点
  recommendStore(data) {
    let url = '/api/memberInfoCard/recommendStore'
    return network.POST(url, data);
  },
  // 会员充值订单列表
  getROrders(data) {
    let url = '/api/order/getMemberCardRechargeOrders'
    return network.POST(url, data);
  },
  // 会员充值订单详细
  getROrder(data) {
    let url = '/api/order/getROrder'
    return network.POST(url, data);
  },
  // 会员卡消费账单
  getMemberCardOrders(data) {
    let url = '/api/order/getMemberCardOrders'
    return network.POST(url, data);
  },
  // 会员消费订单详细
  getOrder(data) {
    let url = '/api/order/getOrder'
    return network.POST(url, data);
  },
  // 根据ID获取门店
  getStore(data) {
    let url = '/api/store/getStore'
    return network.POST(url, data);
  },
  // 根据id查会员卡详情
  selectDetailsById(data) {
    let url = '/api/memberInfoCard/selectDetailsById'
    return network.POST(url, data);
  },
  // 设置会员卡优先使用
  editMemberCardFirst(data) {
    let url = '/api/memberInfoCard/editMemberCardFirst'
    return network.POST(url, data);
  },
  // 获取首页信息
  indexPage(data) {
    let url = '/api/memberInfo/indexPage'
    return network.POST(url, data);
  },
  //获取优惠券详情
  getByMemberCouponIdForOrder(data) {
    let url = '/api/memberInfo/getByMemberCouponIdForOrder'
    return network.POST(url, data);
  },
  // 首页商城数据
  getShopList(data) {
    let url = '/api/memberInfo/getByMemberCouponIdForOrder'
    return network.POST(url, data);
  },
  //小程序登录接口
  getLogin(data) {
    let url = '/auth/login'
    return network.POST(url, data);
  },
  //首页登录接口
  getMemberInfoByOpenId(data) {
    let url = '/auth/getMemberInfoByOpenId'
    return network.POST(url, data);
  },
  //会员一键加油账单
  getMemberFastOrders(data) {
    let url = '/api/order/getMemberFastOrders'
    return network.POST(url, data);
  },
  //会员退款账单
  getMemberRefundOrders(data) {
    let url = '/api/order/getMemberRefundOrders'
    return network.POST(url, data);
  },
  //获取个人中心优惠卡券
  getMemberCoupon(data) {
    let url = '/api/memberInfo/getMemberCoupon'
    return network.POST(url, data);
  },
  //获取个人中心服务卡
  getMemberServiceCard(data) {
    let url = '/api/memberInfo/getMemberServiceCard'
    return network.POST(url, data);
  },
  //获取验证码
  getCode(data) {
    let url = '/util/getCode'
    return network.POST(url, data);
  },
  //修改手机号
  updateMemberPhone(data) {
    let url = '/api/memberInfo/updateMemberPhone'
    return network.POST(url, data);
  },
  //修改支付密码
  updateMember(data) {
    let url = '/api/memberInfo/updateMember'
    return network.POST(url, data);
  },

  // 网约车认证 /api/memberCarCertificationType/list
  memberCarSourceType(data) {
    let url = '/api/memberCarSourceType/list'
    return network.POST(url, data);
  },
  memberCarCertificationType(data) {
    let url = '/api/memberCarCertificationType/list'
    return network.POST(url, data);
  },
  certification(data) {
    let url = '/api/memberCar/save'
    return network.POST(url, data);
  },
  // 挂失副卡 
  lossCard(data) {
    let url = '/api/memberInfoCard/lossCard'
    return network.POST(url, data);
  },
  // 首页校验 副卡
  receiveSubCardStatus(data) {
    let url = '/api/memberInfo/receiveSubCardStatus'
    return network.POST(url, data);
  },
  // 查询注册活动/api/activity/getRegisterActivity
  getRegisterActivity(data) {
    let url = '/api/activity/getRegisterActivity'
    return network.POST(url, data);
  },
  // 触发注册活动 /api/activity/doRegisterActivity
  doRegisterActivity(data) {
    let url = '/api/activity/doRegisterActivity'
    return network.POST(url, data);
  },
  //优惠卡券
  getMemberCouponList(data) {
    let url = '/api/memberInfo/getMemberCouponList'
    return network.POST(url, data);
  },
  //文字
  getTextAdvert(data) {
    let url = '/api/memberInfo/getTextAdvert'
    return network.POST(url, data);
  },
  getRechargeMenberCupPrice(data) {
    let url = "/api/store/getRechargeMemberCupPrice"
    return network.POST(url, data);
  },
  // 会员卡刷新 /util/setCodeExpirationTime
  setCodeExpirationTime(data) {
    let url = "/util/setCodeExpirationTime"
    return network.POST(url, data);
  },
  unionMember(data) {
    let url = "/api/memberInfo/unionMember"
    return network.POST(url, data);
  },
  getStoreDistance(data) {
    let url = "/api/store/getStoreDistance"
    return network.POST(url, data);
  },
  //领券中心
  getCouponCenterActivity(data) {
    let url = "/api/activityKindCouponCenter/getCouponCenterActivity"
    return network.POST(url, data);
  },
  //在领券中心领取优惠券
  getCouponByCenter(data) {
    let url = "/api/activityKindCouponCenter/getCouponByCenter"
    return network.POST(url, data);
  },
  //获取领券中心详情
  getCouponById(data) {
    let url = "/api/memberInfo/getCouponById"
    return network.POST(url, data);
  },
  //一键加油油站新接口
  getStoreForPay(data) {
    let url = "/api/store/getStoreForPay"
    return network.POST(url, data);
  },
  // 对应手机号列表 /api/memberInfo/setDefaultPhone
  getMemberInfoListByOpenId(data) {
    let url = "/api/memberInfo/getMemberInfoListByOpenId"
    return network.POST(url, data);
  },
  // 切换账号
  setDefaultPhone(data) {
    let url = "/api/memberInfo/setDefaultPhone"
    return network.POST(url, data);
  },
  // 支付密码开关 
  updatePaySwitch(data) {
    let url = "/api/memberInfo/updatePaySwitch"
    return network.POST(url, data);
  },
  // /api/memberInfoCard/updatePayPassword
  updatePayPassword(data){
    let url = "/api/memberInfoCard/updatePayPassword"
    return network.POST(url, data);
  },
  // 会员获取站点
  getStoreOnMemberHome(data) {
    let url = "/util/getStoreOnMemberHome"
    return network.POST(url, data);
  },
  // 会员退出
  loginOUt(data){
    let url = "/auth/signOut"
    return network.POST(url, data);
  },
  // 加油校验 消费次数
  getCountByOpenId(data) {
    let url = "/api/order/getCountByOpenId"
    return network.POST(url, data);
  },
}